using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShakeGetRequest : GeneratedMessageLite<ShakeGetRequest, ShakeGetRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShakeGetRequest, ShakeGetRequest.Builder>
		{
			private bool resultIsReadOnly;
			private ShakeGetRequest result;
			protected override ShakeGetRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShakeGetRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShakeGetRequest DefaultInstanceForType
			{
				get
				{
					return ShakeGetRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public SKBuiltinBuffer_t Buffer
			{
				get
				{
					return this.result.Buffer;
				}
				set
				{
					this.SetBuffer(value);
				}
			}
			public int IsNewVerson
			{
				get
				{
					return this.result.IsNewVerson;
				}
				set
				{
					this.SetIsNewVerson(value);
				}
			}
			public Builder()
			{
				this.result = ShakeGetRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShakeGetRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShakeGetRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShakeGetRequest other = this.result;
					this.result = new ShakeGetRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShakeGetRequest.Builder Clear()
			{
				this.result = ShakeGetRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShakeGetRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShakeGetRequest.Builder(this.result);
				}
				return new ShakeGetRequest.Builder().MergeFrom(this.result);
			}
			public override ShakeGetRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShakeGetRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShakeGetRequest)
				{
					return this.MergeFrom((ShakeGetRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShakeGetRequest.Builder MergeFrom(ShakeGetRequest other)
			{
				return this;
			}
			public override ShakeGetRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShakeGetRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShakeGetRequest._shakeGetRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShakeGetRequest._shakeGetRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasBuffer)
							{
								builder2.MergeFrom(this.Buffer);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Buffer = builder2.BuildPartial();
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasIsNewVerson = input.ReadInt32(ref this.result.isNewVerson_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ShakeGetRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public ShakeGetRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public ShakeGetRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public ShakeGetRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public ShakeGetRequest.Builder SetBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = value;
				return this;
			}
			public ShakeGetRequest.Builder SetBuffer(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = builderForValue.Build();
				return this;
			}
			public ShakeGetRequest.Builder MergeBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBuffer && this.result.buffer_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.buffer_ = SKBuiltinBuffer_t.CreateBuilder(this.result.buffer_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.buffer_ = value;
				}
				this.result.hasBuffer = true;
				return this;
			}
			public ShakeGetRequest.Builder ClearBuffer()
			{
				this.PrepareBuilder();
				this.result.hasBuffer = false;
				this.result.buffer_ = null;
				return this;
			}
			public ShakeGetRequest.Builder SetIsNewVerson(int value)
			{
				this.PrepareBuilder();
				this.result.hasIsNewVerson = true;
				this.result.isNewVerson_ = value;
				return this;
			}
			public ShakeGetRequest.Builder ClearIsNewVerson()
			{
				this.PrepareBuilder();
				this.result.hasIsNewVerson = false;
				this.result.isNewVerson_ = 0;
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int BufferFieldNumber = 2;
		public const int IsNewVersonFieldNumber = 3;
		private static readonly ShakeGetRequest defaultInstance;
		private static readonly string[] _shakeGetRequestFieldNames;
		private static readonly uint[] _shakeGetRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasBuffer;
		private SKBuiltinBuffer_t buffer_;
		private bool hasIsNewVerson;
		private int isNewVerson_;
		private int memoizedSerializedSize = -1;
		public static ShakeGetRequest DefaultInstance
		{
			get
			{
				return ShakeGetRequest.defaultInstance;
			}
		}
		public override ShakeGetRequest DefaultInstanceForType
		{
			get
			{
				return ShakeGetRequest.DefaultInstance;
			}
		}
		protected override ShakeGetRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public SKBuiltinBuffer_t Buffer
		{
			get
			{
				return this.buffer_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public int IsNewVerson
		{
			get
			{
				return this.isNewVerson_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasBuffer && this.BaseRequest.IsInitialized && this.Buffer.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasBuffer)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.Buffer);
				}
				if (this.hasIsNewVerson)
				{
					num += CodedOutputStream.ComputeInt32Size(3, this.IsNewVerson);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShakeGetRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shakeGetRequestFieldNames = ShakeGetRequest._shakeGetRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, shakeGetRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasBuffer)
			{
				output.WriteMessage(2, shakeGetRequestFieldNames[1], this.Buffer);
			}
			if (this.hasIsNewVerson)
			{
				output.WriteInt32(3, shakeGetRequestFieldNames[2], this.IsNewVerson);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasBuffer)
			{
				num ^= this.buffer_.GetHashCode();
			}
			if (this.hasIsNewVerson)
			{
				num ^= this.isNewVerson_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShakeGetRequest shakeGetRequest = value as ShakeGetRequest;
			return shakeGetRequest != null && (this.hasBaseRequest == shakeGetRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(shakeGetRequest.baseRequest_))) && (this.hasBuffer == shakeGetRequest.hasBuffer && (!this.hasBuffer || this.buffer_.Equals(shakeGetRequest.buffer_))) && (this.hasIsNewVerson == shakeGetRequest.hasIsNewVerson && (!this.hasIsNewVerson || this.isNewVerson_.Equals(shakeGetRequest.isNewVerson_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShakeGetRequest, ShakeGetRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<ShakeGetRequest, ShakeGetRequest.Builder>.PrintField("Buffer", this.hasBuffer, this.buffer_, writer);
			GeneratedMessageLite<ShakeGetRequest, ShakeGetRequest.Builder>.PrintField("IsNewVerson", this.hasIsNewVerson, this.isNewVerson_, writer);
		}
		public static ShakeGetRequest ParseFrom(byte[] data)
		{
			return ShakeGetRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShakeGetRequest MakeReadOnly()
		{
			return this;
		}
		public static ShakeGetRequest.Builder CreateBuilder()
		{
			return new ShakeGetRequest.Builder();
		}
		public override ShakeGetRequest.Builder ToBuilder()
		{
			return ShakeGetRequest.CreateBuilder(this);
		}
		public override ShakeGetRequest.Builder CreateBuilderForType()
		{
			return new ShakeGetRequest.Builder();
		}
		public static ShakeGetRequest.Builder CreateBuilder(ShakeGetRequest prototype)
		{
			return new ShakeGetRequest.Builder(prototype);
		}
		static ShakeGetRequest()
		{
			ShakeGetRequest.defaultInstance = new ShakeGetRequest().MakeReadOnly();
			ShakeGetRequest._shakeGetRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Buffer",
				"IsNewVerson"
			};
			ShakeGetRequest._shakeGetRequestFieldTags = new uint[]
			{
				10u,
				18u,
				24u
			};
			object.ReferenceEquals(micromsg.Proto.ShakeGetRequest.Descriptor, null);
		}
	}
}
